// 自动生成模板BsProductInfo
package product

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"

	"gorm.io/datatypes"
)

// 二手商品 结构体  BsProductInfo
type BsProductInfo struct {
	global.GVA_MODEL
	Name         string         `json:"name" form:"name" gorm:"column:name;comment:;" binding:"required"`       //商品名称
	Icon         string         `json:"icon" form:"icon" gorm:"column:icon;comment:;"`                          //商品封面图片
	Price        *float64       `json:"price" form:"price" gorm:"column:price;comment:;"`                       //价格
	Detail       string         `json:"detail" form:"detail" gorm:"column:detail;comment:;"`                    //详情
	Picture      datatypes.JSON `json:"picture" form:"picture" gorm:"column:picture;comment:;"`                 //图片
	Status       *int           `json:"status" form:"status" gorm:"column:status;comment:;"`                    //商品状态
	Inventory    *int           `json:"inventory" form:"inventory" gorm:"column:inventory;comment:;"`           //库存
	Category     string         `json:"category" form:"category" gorm:"column:category;comment:;"`              //类型
	CollectCount *int           `json:"collectCount" form:"collectCount" gorm:"column:collect_count;comment:;"` //收藏数量
	CreatedBy    uint           `gorm:"column:created_by;comment:创建者"`
	UpdatedBy    uint           `gorm:"column:updated_by;comment:更新者"`
	DeletedBy    uint           `gorm:"column:deleted_by;comment:删除者"`
}

// TableName 二手商品 BsProductInfo自定义表名 bs_product_info
func (BsProductInfo) TableName() string {
	return "bs_product_info"
}
